<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">


<title>Formulario alertas</title>


 <link rel="stylesheet" type="text/css" href=" <?php echo base_url();?>css/style_list_tecn.css"></link>

</head>

<body onload="noMarcar(); window.parent.scrollTo(0,0)">

<span style="color: red;"><?php echo validation_errors(); ?></span>

<?php echo form_open('alertas/modificar_alerta/'.$idAlerta.''); ?>

<?php foreach($alertas as $al){?>

<h4>Modifique los datos de la alerta que desee: </h4></br>


<section id="cajaform">

<label>Nombre</label>
<input type="text" name="nombre" value="<?= $al->nombre ?>" size="25" style="float: right;"/></br></br>
<label>Apellidos</label>
<input type="text" name="apellidos" value="<?= $al->apellidos?>" size="25" style="float: right;"/></br></br>
<label>Nivel</label>
<select name ="nivel" id="nivel" style="float: right;"> 
 <?php foreach($niveles as $item){?>
        
    <?php if( $item['idNivelA']== $al->nivel){ ?>                          
         
       <option value="<?= $item['idNivelA']; ?>"selected><?= $item['nivelAlerta'];?></option> 
          <?php } else {?>
                 <option value="<?= $item['idNivelA']; ?>"><?= $item['nivelAlerta'];?></option> 
          
          <?php }  }?>
          
          </select></br></br>
<label>Email</label>
<input type="text" name="email" value="<?= $al->email?>" size="25" style="float: right;"/></br></br>
<label>Movil</label>
<input type="text" name="movil" value="<?= $al->movil?>" size="25" style="float: right;"/></br></br>


<label>Subcontrata</label>
<select name="empresa" id="empresa" style="float: right;">
<?php foreach($subcons as $sb):?>
<?php if($sb->idSubcontrata == $al->empresa){?>
<option value="<?php echo $sb->idSubcontrata?>"selected><?= $sb->nombreSub ?></option>
<?php } else {?>
<option value="<?php echo $sb->idSubcontrata?>"><?= $sb->nombreSub ?></option>

<?php }?>
<?php endforeach;?>
</select></br></br>


<?php }?>

<section><button type="submit" class="btnLogin" style="float: right;" >Guardar</button></section>

</section>
</form>
</body>
</html>
